Object documentationBilling Document Headers

 

Header of the billing document

Structure

You define the properties of billing document headers using the import table HEADERS. A billing document (structure FKKINVBILL_H) is created for each entry in this table (structure BAPI_IST_EXTDOC_H). The following overview shows the fields of the billing document header to which the fields of table HEADERS are transferred:

Source Field in Table HEADERS

Target Field in Billing Document Header

Note

REFDOCNO

REFDOCNO

LOG_SYSTEM

LOG_SYSTEM

APPL_AREA

APPLK

SRCPROCESS

SRCPROCESS

DOCTYPE_BILL_EXT

DOCTYPE

Mapping using posting area 2645

CONT_ACCT_ID

VKONT

Mapping using BAdI FKKINV_BAPIBILL

CONT_ACCT

VKONT

BUSPARTNER

GPART

DATE_FROM

DATE_FROM

DATE_TO

DATE_TO

SIMULATED

SIMULATED

CURRENCY

BILL_CURR

ISO_CODE

BILL_CURR

Only used if CURRENCY is not filled

INV_CURR

INV_CURR

INV_CURR_ISO_CODE

INV_CURR

Only used if INV_CURR is not filled

TAX_DET_TYPE

TAX_DET_TYPE

TAX_DATE_TYPE

TAX_DATE_TYPE

SEPARATE_INV

SEPARATE_INV

INVOICE_FIRST

INVOICE_FIRST

ADD_GROUP

ADD_GROUP

The individual fields and their meaning are explained below. Also see the documentation for the fields of the structures BAPI_IST_EXTDOC_H and FKKINVBILL_H.

In the mandatory field LOG_SYSTEM you specify the key of the logical system from which the external document is transferred. Enter the document number of the external document in the mandatory field REFDOCNO. The external document number must be unique with the key of the logical system. (That is, it must not exist already.) This also applies for simulation documents and reversal documents. The system checks whether a billing document with this combination already exists.

In the mandatory field APPL_AREA, specify the application area.

Describe the origin process that created the external billing document in the field SRCPROCESS. You must maintain the values in the system table TFK2641. Use the customer name range 9* in this table. If you do not make an entry in the field, the BAPI writes the default value 0003 External Billing Program to the billing document header.

Together with the logical system, you use the mandatory field DOCTYPE_BILL_EXT to access posting area 2645. Posting area 2645 defines the document type of the billing document. The system takes into account whether the document is a simulation document (SIMULATED field is filled).

You can fill the field CONT_ACCT with the key of the contract account. The field is optional. If you do not make an entry, you have to enter the external ID of the contract account in the CONT_ACCT_ID field. The method CONTRACT_ACCOUNT_DETERMINE of the BAdI FKKINV_BAPIBILL is called to fill the key of the contract account and the key of the business partner in the billing document header. For more information, see the documentation of the method.

You can fill the field BUSPARTNER with the key of the business partner. If you do not make an entry, you should fill CONT_ACCT_ID and determine the key of the business partner in the BAdI specified. If neither BUSPARTNER nor CONT_ACCT_ID contain entries, the system tries to determine the key of the business partner using the contract account. However, this is only possible if there is exactly one business partner for the contract account.

The mandatory fields DATE_FROM and DATE_TO define the start and end of the billing period to which the billing document relates. DATE_FROM and DATE_TO can be the same, but the DATE_TO date is not allowed to be before the DATE_FROM date.

If you enter value X in the field SIMULATED, the billing document is deemed to be a simulation document. The document is not posted. No invoicing order is created. You can invoice the simulated billing document for test purposes as follows:

  1. Use the transaction Create Invoicing Document on the SAP Easy Access screen under Start of the navigation path Convergent Invoicing Next navigation step Invoicing Documents Next navigation step Create End of the navigation path.

  2. Set the indicator Simulation Run and select the option Without Invoicing Order.

  3. Enter the document number of the simulation document and the source document category INVBI.

Invoicing creates a simulated invoicing document.

With the field CURRENCY you define the currency of the billing document. If you do not make an entry in the CURRENCY field, you have to enter the ISO code currency key in the ISO_CODE field.

With INV_CURR you define the target currency for invoicing. As an alternative, you can enter the relevant ISO code in the INV_CURR_ISO_CODE field. Both fields are optional. If you do not make an entry in either field, the currency of the billing document is used as the target currency for invoicing. Usually, you do not have to specify an explicit target currency for invoicing. For an application example, see the documentation of the INV_CURR field in the structure FKKINVBILL_H.

In the mandatory field TAX_DET_TYPE, you define how the taxes are determined. You can choose between the following fixed values:

  • 00 No Tax Calculation: Then no tax is calculated in invoicing.

  • 01 Internal Tax Calculation Invoicing determines the tax for each posting-relevant line item.

  • 02 External Tax Calculation The tax amounts must be specified externally as billing document tax items.

The field TAX_DATE_TYPE is mandatory if you have selected internal tax calculation in the TAX_DET_TYPE field. In both other cases (No Tax Calculation or External Tax Calculation), there must not be an entry in TAX_DATE_TYPE). TAX_DATE_TYPE specifies which date is used for the tax calculation. You can choose between the following fixed values:

  • 01 Tax Calculation for Document Date

  • 02 Tax Calculation for Posting Date

  • 03 Tax Calculation for Date of Creation

  • 04 Tax Calculation for External Tax Date

With the optional field SEPARATE_INV, you define whether a billing document can be invoiced with other billing documents from the same contract account and grouped in one invoicing document. However, invoicing does not consider just the value of the SEPARATE_INV field; it is also influenced by the grouping variants and by event 2601. See the documentation of Customizing activity Maintain Grouping Variants in Customizing for Contract Accounts Receivable and Payable under Start of the navigation path Convergent Invoicing Next navigation step Invoicing Next navigation step Invoicing Processes End of the navigation path.

With the optional field INVOICE_FIRST, you can define the earliest date from which the billing document can be invoiced. If you make an entry in the field, the billing document is only invoiced if the document date for invoicing is the same or older than the date in the INVOICE_FIRST field. If you do not make an entry in INVOICE_FIRST, the billing document can be invoiced at any time.

You can use the optional field ADD_GROUP to assign one or more document additional items to the billing document header. If you do not use billing document additional items, the field remains empty.